//
//  myButton.m
//  日夜间(范阳)
//
//  Created by dllo on 15/11/2.
//  Copyright © 2015年 dllo. All rights reserved.
//

#import "myButton.h"
#import "PrefixHeader.pch"
@implementation myButton

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self information];
         [self NightWithType:UIViewColorTypeNormal];
        self.titleLabel.font =  [FontSizeManage ChangeSize].titleFont;
        [self setTitleColor:[UIColor grayColor] forState:UIControlStateNormal];
        
    }
    return self;
}
#pragma mark - 开始监听
-(void)information
{
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(setFontSize:) name:@"changeFontSize" object:nil];
}
-(void)setFontSize:(NSNotification *)notification
{
    self.titleLabel.font = (UIFont *)[notification object];
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
